package gr.atc.epart.actions;

import gr.atc.epart.users.User;

import java.util.Date;

public abstract class Action {

	public enum Type {
		ePetition,
		Survey,
		Deliberation,
		Event,
		All
	}
	
	protected int _id;
	protected int _platformId;
	protected Type _type;
	protected String _name;
	protected String _description;
	protected User _creator;
	protected Date _dateCreated;
	protected Date _dateModified;
	protected int _popularity;
	protected int _visits;
	protected String [] _tags;
	
	public int getId() 
	{
		return _id;
	}
	
	public void setId(int id) 
	{
		_id = id;
	}
	
	
	public String[] getTags() 
	{
		return _tags;
	}

	public void setTags(String[] tags) 
	{
		_tags = tags;
	}

	public Type getType() 
	{
		return _type;
	}

	public void setType(Type  type) 
	{
		_type = type;
	}

	public String getName() 
	{
		return _name;
	}

	public void setName(String name) 
	{
		_name = name;
	}

	public String getDescription() 
	{
		return _description;
	}

	public void setDescription(String  description) 
	{
		_description = description;
	}

	public User getCreator() 
	{
		return _creator;
	}

	public void setCreator(User  creator) 
	{
		_creator = creator;
	}

	public Date getDateCreated() 
	{
		return _dateCreated;
	}

	public void setDateCreated(Date dateCreated) 
	{
		_dateCreated = dateCreated;
	}

	public Date getDateModified() 
	{
		return _dateModified;
	}

	public void setDateModified(Date  dateModified) 
	{
		_dateModified = dateModified;
	}
	
	public int getPopularity() 
	{
		return _popularity;
	}

	public int getVisits() 
	{
		return _visits;
	}
	
	public void updatePopularity(int value) 
	{
		_popularity += value;
	}
	
	public int getPlatformId()
	{
		return _platformId;
	}		

	public void setPlatformId(int platformId)
	{
		_platformId = platformId;
	}		

	public void updateVisits(int newVisits) 
	{
		_visits += newVisits;
	}
	
}
